package com.tange.ai.iot.client.gnssa.glide

import android.content.Context
import com.bumptech.glide.Glide
import com.bumptech.glide.GlideBuilder
import com.bumptech.glide.Registry
import com.bumptech.glide.annotation.GlideModule
import com.bumptech.glide.module.AppGlideModule
import java.io.InputStream

@GlideModule
class MyAppGlideModule : AppGlideModule() {
    override fun registerComponents(context: Context, glide: Glide, registry: Registry) {
        registry.prepend(
            String::class.java,
            InputStream::class.java,
            Base64ModelLoaderFactory()
        )
    }

    override fun applyOptions(context: Context, builder: GlideBuilder) {
        // 可在此配置Glide选项
    }
}